# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=XML-Simple
pkgname=perl-${_realname}
pkgver=2.25
pkgrel=1
groups=('perl-modules')
pkgdesc="Simple XML parser for perl"
arch=('any')
license=('PerlArtistic')
url="https://metacpan.org/${_realname}/"
depends=('perl-XML-Parser' 'perl')
options=('!emptydirs')
source=("https://cpan.org/authors/id/G/GR/GRANTM/${_realname}-${pkgver}.tar.gz")
sha256sums=('531fddaebea2416743eb5c4fdfab028f502123d9a220405a4100e68fc480dbf8')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
